import Vue from 'vue'
import VueRouter from 'vue-router'
import EmpView from '@/components/EmpView.vue'

Vue.use(VueRouter);

const routes=[
    {
        path:'/emp',
        name:'emp',
        component: EmpView
    },
    {
        path:'/dept',
        name:'dept',
        component: ()=>import('../components/DeptView.vue')
    },
    {
        path:'/',
        redirect:'/emp'
    }
]

const router=new VueRouter({
    routes
})


export default router;